
#ifndef  FILESTREAMBINARYPERSIST_H
#define  FILESTREAMBINARYPERSIST_H

#include <istream>
#include "IPersist.h"

class FileStreamBinaryPersist : public IPersist {
public:
    FileStreamBinaryPersist(const std::string & filePath);
    virtual ~FileStreamBinaryPersist();

    void open() const override;
    const long long readLongLong() const override;
    void writeLongLong(const long long seqNo) override;

    void close() const override;
    void flush() override;
private:
    std::string filePath;
    mutable std::basic_iostream<char> *io;
};


#endif   /* FILESTREAMBINARYPERSIST_H */
